Page({
  onLoad() {
    this.getVistorList()
  },
  goPassport(e) {
    // console.log(e)
    const { status,id } = e.mark
    if (status === 0) return wx.utils.toast('通行证已失效')
    wx.navigateTo({
      url: '/visitor_pkg/pages/passport/index?id=' + id,
    })
  },
  async getVistorList() {
    // 获取访客列表
    const res = await wx.http.get('/visitor', { current: 1, pageSize: 30 })
    // console.log(res)
    this.setData({
      vistorList: res.data.rows
    })
  }
})
